import Vue from 'vue'
import Router from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(Router)

export default new Router({
    routes: [
      {
        path: '/',
        name: 'Home',
        component: Home,
        children: [
          {
            path: '/', /*children中默认显示*/
            component: () => import('../views/Main.vue')
          },
          {
            path: '/main',
            component: () => import('../views/Main.vue')
          },
          {
            path: '/credit',
            component: () => import('../views/Credit.vue')
          },
          {
            path: '/repay',
            component: () => import('../views/Repay.vue')
          },
          {
            path: '/profile',
            component: () => import('../views/Profile.vue')
          }
        ]
      },
      {
        path: '/login',
        component: () => import('../views/Login')
      },
      {
        path: '/progress',
        component: () => import('../views/components/Progress')
      },
      {
        path: '/count',
        component: () => import('../views/components/Count')
      },
      {
        path: '/reback',
        component: () => import('../views/components/Reback')
      },
      {
        path: '/guide',
        component: () => import('../views/components/Guide')
      },
      {
        path: '/reguide',
        component: () => import('../views/components/ReGuide')
      },
    ]
});
